#ifndef _IUPACKETETHERNET_HPP_
#define _IUPACKETETHERNET_HPP_

#include "iuPacket.hpp"
#include "iuMacAddress.hpp"

/**
 * @brief Classe representant une trame Ethernet
 */
class iuPacketEthernet : public iuPacket
{
public:
   iuPacketEthernet();
   ~iuPacketEthernet();
   
   uint16_t getBufferLen() const;
   uint16_t fromBuffer(const char *buffer, uint16_t len);
   uint16_t toBuffer(char *buffer) const;
   
   void                setDestination(const iuMacAddress &dest);
   const iuMacAddress &getDestination() const;
   void                setSource(const iuMacAddress &src);
   const iuMacAddress &getSource() const;
   void                setType(uint16_t type);
   uint16_t            getType() const;
   void                setData(iuPacket *data);
   iuPacket           *getData() const;
   
private:
   iuMacAddress m_dest;
   iuMacAddress m_src;
   uint16_t m_type;
   iuPacket *m_data;
};

#endif
